package coms;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;


public class ServerTester {
	public static void main(String[] args) throws IOException {
		
		/**
		 * This code demonstrates how the server might work. It should be started after
		 * the ClientTest code.
		 */
		
		ConnectingServer server = new ConnectingServer(5001);

		BufferedReader in = server.getBufferedReader();

		String l;
		while(server.isConnected() && ((l = in.readLine()) != null)) {
				System.out.println("this is my server talking, saying: " + l);
		}


		server.closeConnection();
		}


}